package com.yike.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yike.user.entity.User;

import com.yike.user.param.CustomerPageParam;
import com.yike.user.param.UserPageParam;
import com.yike.user.vo.CustomerVo;
import com.yike.user.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;

import org.apache.ibatis.annotations.Param;

/**
 * 用户表 Mapper 接口
 *
 * @author yike
 * @since 2024-07-17
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    User selectByOpenIdOrUnionId(@Param("openId") String openId, @Param("unionId") String unionId);

    IPage<UserVo> getUserList(@Param("page") Page page, @Param("param") UserPageParam param);

    IPage<CustomerVo> getCustomerList(@Param("page") Page page, @Param("param") CustomerPageParam param);

    CustomerVo getCustomer(@Param("id") Long id);

}
